package com.itheima.entry;

import com.itheima.controller.ManagerController;
import com.itheima.controller.UserController;

import java.util.Scanner;

public class Entry {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);


        while (true) {
            System.out.println("--------欢迎光临水果超市--------");
            System.out.println("请选择您的登录身份: 1.顾客  2.管理员  3.退出");
            String choice = sc.next();
            switch (choice) {
                case "1":

                    UserController userController = new UserController();
                    userController.start();
                    //start方法用来开启顾客的usercontroller
                    break;
                case "2":
                    ManagerController managerController = new ManagerController();
                    managerController.start();
                    //start方法用来开启顾客的managercontroller
                    break;
                case "3":
//                  退出jvm，结束程序
                    System.exit(0);
                    break;
                default:
                    System.out.println("输入有误，请重新输入");

            }
        }

    }
}
